package com.luchao.back.mapper;

import com.luchao.back.pojo.Brands;
import com.luchao.back.pojo.Color;
import com.luchao.back.pojo.Shoes;
import com.luchao.back.pojo.Types;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShoesMapper {

    List<Shoes> getShoesByPage(@Param("startNum") int startNum, @Param("pageSize") int pageSize, @Param("sizeids") List<Integer> sizeids, @Param("sbids") List<Integer> sbids, @Param("stids") List<Integer> stids, @Param("scids") List<Integer> scids, @Param("sgenders") List<String> sgenders);

    long getShoesCount(@Param("sizeids") List<Integer> sizeids, @Param("sbids") List<Integer> sbids, @Param("stids") List<Integer> stids, @Param("scids") List<Integer> scids, @Param("sgenders") List<String> sgenders);

    List<Types> getShoesTypesByPage(@Param("startNum") int startNum, @Param("pageSize") int pageSize);

    List<Brands> getShoesBrandsByPage(@Param("startNum") int startNum, @Param("pageSize") int pageSize);

    List<Color> getShoesColorsByPage(@Param("startNum") int startNum, @Param("pageSize") int pageSize);

    List<String> getShoesProducerByPage(@Param("startNum") int startNum, @Param("pageSize") int pageSize);

    int editShoes(Shoes shoes);

    List<Shoes> getAllShoes();

    int checkShoes(String sname);

    int checkSnum(String snum);

    int batchChangeState(List<Shoes> shoes);

    int createShoes(Shoes shoe);

    Shoes getShoesById(Integer sid);

    List<Shoes> getShoesByBrands(Integer bid);

    List<Shoes> getShoesTop(@Param("sgender") String sgender, @Param("topWay") String topWay);

    int updateShoesTimessOld(@Param("osnum") Integer osnum, @Param("sid") int sid);
}
